package com.itic.appbase.applications.sys.org.persistence.dao;

import java.util.List;
import java.util.Map;

import com.itic.appbase.applications.sys.org.persistence.basedao.OrgMapper;
import com.itic.appbase.applications.sys.org.persistence.model.Org;
import com.itic.appbase.applications.sys.org.persistence.model.OrgExample;
import com.itic.appbase.framework.common.annotation.IticDBDao;
import com.itic.appbase.framework.common.persistence.dao.CrudDao;

@IticDBDao
public interface OrgDao
        extends OrgMapper, CrudDao<Org, OrgExample> {

    /**
     * 查询组织机构树
     * 
     * @param queryOrg
     * @return
     */
    List<Org> selectOrgTree(Org queryOrg);

    /**
     * 根据id删除组织机构树
     * 
     * @param paramMap[id: 主键; dbTrue: 数据库有效标识; dbFalse: 数据库无效标识]
     * @return
     */
    int deleteOrgTree(Map<String, String> paramMap);

    /**
     * 根据组织机构code查询组织机构
     * 
     * @param org [code: 组织机构码; isEffective: 有效标识]
     * @return
     */
    Org selectOrgByCode(Org org);
}